package com.hl.toolkit.server.tycoin.account.slaveservice;

import com.tycoin.account.slaveentity.TycoinAccount;
import com.tycoin.account.slaverepository.TycoinAccountRepository;
import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(value = "slaveTransactionManager", readOnly = true)
public class TycoinAccountService   extends AbstractService<TycoinAccount, Long> {

	@Autowired
	private TycoinAccountRepository tycoinAccountRepository;
		
	
	@Override
	public AbstractRepository<TycoinAccount, Long> getRepository() {
 		return tycoinAccountRepository;
	}
 
	
	
	public TycoinAccount  findOneByuserId(String userId) {
 		return tycoinAccountRepository.findOneByuserId(userId);
	}
	
	
	

}
